package com.ruoyi.chat.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.List;

/**
 * 知识库信息对象 dataset
 * 
 * @author ruoyi
 * @date 2025-03-24
 */
public class Dataset extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 知识库ID */
    private Long id;

    /** ragFlow知识库的唯一标识 */
    private String ragDatasetId;

    /** 名称 */
    @Excel(name = "名称")
    private String name;

    /** 描述 */
    @Excel(name = "描述")
    private String description;

    /** 头像的base64编码 */
    @Excel(name = "头像的base64编码")
    private String avatar;

    /** 要使用的嵌入模型的名称 */
    @Excel(name = "要使用的嵌入模型的名称")
    private String embeddingModel;

    /** 分块方法 */
    @Excel(name = "分块方法")
    private String chunkMethod;

    /** 解析器的配置设置 */
    @Excel(name = "解析器的配置设置")
    private String parserConfig;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    /** 是否展示(0代表不展示 1代表展示) */
    @Excel(name = "是否展示(0代表不展示 1代表展示)")
    private String isShow;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    // 用于存放当前知识库设置共享的角色id集合
    private List<DatasetRole> roles;

    public Dataset() {}

    public void setRagDatasetId(String ragDatasetId) {this.ragDatasetId = ragDatasetId;}

    public String getRagDatasetId() {return this.ragDatasetId;}

    public void setRoles(List<DatasetRole> roles) {
        this.roles = roles;
    }

    public List<DatasetRole> getRoles() {
        return roles;
    }

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }

    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }

    public void setAvatar(String avatar) 
    {
        this.avatar = avatar;
    }

    public String getAvatar() 
    {
        return avatar;
    }

    public void setEmbeddingModel(String embeddingModel) 
    {
        this.embeddingModel = embeddingModel;
    }

    public String getEmbeddingModel() 
    {
        return embeddingModel;
    }

    public void setChunkMethod(String chunkMethod) 
    {
        this.chunkMethod = chunkMethod;
    }

    public String getChunkMethod() 
    {
        return chunkMethod;
    }

    public void setParserConfig(String parserConfig) 
    {
        this.parserConfig = parserConfig;
    }

    public String getParserConfig() 
    {
        return parserConfig;
    }

    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }

    public void setIsShow(String isShow) 
    {
        this.isShow = isShow;
    }

    public String getIsShow() 
    {
        return isShow;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("description", getDescription())
            .append("avatar", getAvatar())
            .append("embeddingModel", getEmbeddingModel())
            .append("chunkMethod", getChunkMethod())
            .append("parserConfig", getParserConfig())
            .append("userId", getUserId())
            .append("isShow", getIsShow())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
